# Contributor: Luca Weiss <luca@z3ntu.xyz>
# Maintainer: Luca Weiss <luca@z3ntu.xyz>
pkgname=gammaray
pkgver=2.11.3
pkgrel=0
pkgdesc="A tool for examining the internals of a Qt application and to some extent also manipulate it"
url="https://www.kdab.com/development-resources/qt-tools/gammaray/"
# ppc64le, s390x, armhf and riscv64 blocked by qt5-qtwebengine
# x86 blocked by lldb
arch="all !ppc64le !s390x !armhf !riscv64 !x86"
license="GPL-2.0-or-later"
depends="lldb"
makedepends="
	cmake
	kcoreaddons-dev
	qt5-qtbase-dev
	qt5-qtconnectivity-dev
	qt5-qtdeclarative-dev
	qt5-qtlocation-dev
	qt5-qtscript-dev
	qt5-qtsvg-dev
	qt5-qttools-dev
	qt5-qtwayland-dev
	qt5-qtwebengine-dev
	syntax-highlighting-dev
	"
subpackages="$pkgname-dev $pkgname-doc"
source="https://github.com/KDAB/GammaRay/releases/download/v$pkgver/gammaray-$pkgver.tar.gz"
options="!check" # No tests

build() {
	cmake -B build \
		-DCMAKE_BUILD_TYPE=None \
		-DCMAKE_INSTALL_PREFIX=/usr \
		-DCMAKE_INSTALL_LIBDIR=lib
	cmake --build build
}

package() {
	DESTDIR="$pkgdir" cmake --install build
	gzip "$pkgdir"/usr/share/man/man1/gammaray.1
}

sha512sums="
1fb16678ae4695567ffe6cca7870b3fcf8b82c2e9f15f005932586696a3e24f64e657ce25b0ebb87ba25646a6bdfe1c9b35a3604f341839e7c5183df859c05a0  gammaray-2.11.3.tar.gz
"
